menusectionbox: Avoid a gtk_widget_destroy() call
authorTimm Bäder <mail@baedert.org>
Sat, 22 Feb 2020 08:07:48 +0000 (09:07 +0100)
committerTimm Bäder <mail@baedert.org>
Tue, 25 Feb 2020 10:08:25 +0000 (11:08 +0100)
gtk/gtkmenusectionbox.c

index 9aec305ec631b9ee150ad860919371b0a6d15817..94760fdf9f4ea793e86594ffe3feac3e489cbc65 100644 (file)
@@ -222,7 +222,8 @@ gtk_menu_section_box_remove_func (gint     position,
         gtk_container_remove (GTK_CONTAINER (stack), subbox);
     }
 
-  gtk_widget_destroy (g_list_nth_data (children, position));
+  gtk_container_remove (GTK_CONTAINER (box->item_box),
+                        g_list_nth_data (children, position));
   g_list_free (children);
 
   gtk_menu_section_box_schedule_separator_sync (box);